package com.peas.platform.module.icims.base.approve.controller.vo;

import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("审批单操作")
public class ApproveOrderOperVo extends BaseVo {

    @Comment(value = "审批单操作类型", enumType = "ApproveOrderOperType")
    @ApiModelProperty(value = "审批单操作类型", notes = "枚举取值:ApproveOrderOperType")
    @NotBlank(message = "审批单操作类型不能为空")
    @Size(max = 20, message = "审批单操作类型不能超过20个字符")
    private String approveOrderOperType;

    // （审批单表）外键
    @Comment(value = "审批单ID")
    @ApiModelProperty(value = "审批单ID")
    @NotNull(message = "审批单ID不能为空")
    private Long approveOrderId;

    @Comment(value = "审批单编号")
    @ApiModelProperty(value = "审批单编号")
    @NotBlank(message = "审批单编号不能为空")
    @Size(max = 100, message = "审批单编号不能超过100个字符")
    private String approveOrderCode;

    @Comment(value = "审批单名称")
    @ApiModelProperty(value = "审批单名称")
    @Size(max = 200, message = "审批单名称不能超过200个字符")
    private String approveOrderName;

    // （用户表）外键
    @Comment(value = "当前审批人用户ID")
    @ApiModelProperty(value = "当前审批人用户ID")
    @NotNull(message = "当前审批人用户ID不能为空")
    private Long currentApproveUserId;

    @Comment(value = "当前节点编号")
    @ApiModelProperty(value = "当前节点编号")
    @Max(value = 9, message = "当前节点编号取值无效")
    private Integer currentNo;

    @Comment(value = "当前节点名称")
    @ApiModelProperty(value = "当前节点名称")
    @Size(max = 100, message = "当前节点名称不能超过100个字符")
    private String currentName;

    // 通过、驳回
    @Comment(value = "审批结果", enumType = "ApproveResult")
    @ApiModelProperty(value = "审批结果", notes = "枚举取值:ApproveResult")
    @Size(max = 20, message = "审批结果不能超过20个字符")
    private String approveResult;

    @Comment(value = "审批意见")
    @ApiModelProperty(value = "审批意见")
    private String approveOpinion;

    @Comment(value = "业务单类型", enumType = "ApproveOrderBusinessType")
    @ApiModelProperty(value = "业务单类型", notes = "枚举取值:ApproveOrderBusinessType")
    @Size(max = 20, message = "业务单类型不能超过20个字符")
    private String businessType;

    // 外键
    @Comment(value = "业务单ID")
    @ApiModelProperty(value = "业务单ID")
    private Long businessId;

    @Comment(value = "业务单详情URL")
    @ApiModelProperty(value = "业务单详情URL")
    @Size(max = 500, message = "业务单详情URL不能超过500个字符")
    private String businessUrl;

}
